import 'package:flutter/material.dart';

class Page3 extends StatelessWidget {
  const Page3({super.key, this.text});
  final String? text;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('Page 3'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('Welcome to Page 3!', style: TextStyle(fontSize: 24)),
            Text('The text from page2 is $text'),
          ],
        ),
      ),
    );
  }
}
